package com.party.admin.web.dto.output.notify;

import com.party.core.model.notify.TargetTemplate;
import org.springframework.beans.BeanUtils;

/**
 * 短信模板输出视图
 * Created by wei.li
 *
 * @date 2017/10/12 0012
 * @time 9:39
 */
public class TemplateOutput extends TargetTemplate{

    //功能模块
    private String module;

    //成功数
    private Integer successNum;

    //失败数
    private Integer failureNum;

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public Integer getSuccessNum() {
        return successNum;
    }

    public void setSuccessNum(Integer successNum) {
        this.successNum = successNum;
    }

    public Integer getFailureNum() {
        return failureNum;
    }

    public void setFailureNum(Integer failureNum) {
        this.failureNum = failureNum;
    }

    public static TemplateOutput transform(TargetTemplate targetTemplate){
        TemplateOutput templateOutput = new TemplateOutput();
        BeanUtils.copyProperties(targetTemplate, templateOutput);
        return templateOutput;
    }
}
